<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  你好{{a}}
  <ul class="box" v-if="a">
    <ul>
      <li>A</li>
      <li>B</li>
      <li>C</li>
    </ul>
  </ul>
  <input type="text" v-model="a"/>
</div>
<button onclick="addVm()">增加</button>
<script src="./dist/bundle.js"></script>
<script>
  var vm = new Vue({
    el: '#app',
    data:{
      a:10
    },
    watch:{
      a(){
        console.log('a改变了');
      }
    }
  })
  function addVm(){
    vm.a++
  }
</script>
</body>
</html>